using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools._Configuration._LRSIntersection
{
    /// <summary>
    /// <para>Create LRS Intersection From Existing Dataset</para>
    /// <para>Registers an existing intersection feature class as an intersection.</para>
    /// <para>将现有交集要素类注册为交集。</para>
    /// </summary>    
    [DisplayName("Create LRS Intersection From Existing Dataset")]
    public class CreateLRSIntersectionFromExistingDataset : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateLRSIntersectionFromExistingDataset()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_parent_network">
        /// <para>Parent LRS Network</para>
        /// <para>The network to which the intersection will be registered.</para>
        /// <para>将注册交叉点的网络。</para>
        /// </param>
        /// <param name="_network_description_field">
        /// <para>Network Description Field</para>
        /// <para>The field in the network layer that will be used to name the intersections with other intersecting layers.</para>
        /// <para>网络图层中将用于命名与其他相交图层的交点的字段。</para>
        /// </param>
        /// <param name="_in_feature_class">
        /// <para>Intersection Feature Class</para>
        /// <para>The input point feature class to be registered.</para>
        /// <para>要注册的输入点要素类。</para>
        /// </param>
        /// <param name="_intersection_id_field">
        /// <para>Intersection ID Field</para>
        /// <para>The ID field in the Intersection Feature Class. The field must have a unique ID for each intersection for a time slice.</para>
        /// <para>相交要素类中的 ID 字段。对于时间片的每个交点，该字段必须具有唯一的 ID。</para>
        /// </param>
        /// <param name="_intersection_name_field">
        /// <para>Intersection Name Field</para>
        /// <para>The field in the Intersection Feature Class that is a concatenated field showing the descriptors for the route and the intersecting feature.</para>
        /// <para>相交要素类中的字段，该字段是显示路径和相交要素的描述符的串联字段。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route ID Field</para>
        /// <para>The field in the Intersection Feature Class that contains the route ID for the LRS Network.</para>
        /// <para>交汇要素类中包含 LRS 网络路径 ID 的字段。</para>
        /// </param>
        /// <param name="_feature_id_field">
        /// <para>Feature ID Field</para>
        /// <para>The field in the Intersection Feature Class that contains the ID for the intersecting feature.</para>
        /// <para>相交要素类中包含相交要素 ID 的字段。</para>
        /// </param>
        /// <param name="_feature_class_name_field">
        /// <para>Feature Class Name Field</para>
        /// <para>The field in the Intersection Feature Class that contains the name of the feature class that participated in the intersection.</para>
        /// <para>“相交要素类”中的字段，其中包含参与相交的要素类的名称。</para>
        /// </param>
        /// <param name="_from_date_field">
        /// <para>From Date Field</para>
        /// <para>The from date field in the Intersection Feature Class.</para>
        /// <para>相交要素类中的起始日期字段。</para>
        /// </param>
        /// <param name="_to_date_field">
        /// <para>To Date Field</para>
        /// <para>The to date field in the Intersection Feature Class.</para>
        /// <para>相交要素类中的当前字段。</para>
        /// </param>
        /// <param name="_intersecting_layers">
        /// <para>Intersecting Layers</para>
        /// <para><xdoc>
        ///   <para>The feature class that intersects the LRS Network and contains the following information:</para>
        ///   <bulletList>
        ///     <bullet_item>Intersection Layer—The feature class that intersects the LRS Network.</bullet_item><para/>
        ///     <bullet_item>ID Field—The field in the intersecting layer used to uniquely identify the feature that intersects the network.</bullet_item><para/>
        ///     <bullet_item>Description Field—The field that provides the description, such as town or county name, of the intersecting feature.</bullet_item><para/>
        ///     <bullet_item>Name Separator—The name separator for the intersection, such as AND, INTERSECT, +, or |.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>与 LRS 网络相交并包含以下信息的要素类：</para>
        ///   <bulletList>
        ///     <bullet_item>交点图层 - 与 LRS 网络相交的要素类。</bullet_item><para/>
        ///     <bullet_item>ID 字段 - 相交图层中的字段，用于唯一标识与网络相交的要素。</bullet_item><para/>
        ///     <bullet_item>描述字段 - 提供相交要素的描述（例如城镇或县名称）的字段。</bullet_item><para/>
        ///     <bullet_item>名称分隔符 - 相交的名称分隔符，例如 AND、INTERSECT、+ 或 |。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CreateLRSIntersectionFromExistingDataset(object _parent_network, object _network_description_field, object _in_feature_class, object _intersection_id_field, object _intersection_name_field, object _route_id_field, object _feature_id_field, object _feature_class_name_field, object _from_date_field, object _to_date_field, object _intersecting_layers)
        {
            this._parent_network = _parent_network;
            this._network_description_field = _network_description_field;
            this._in_feature_class = _in_feature_class;
            this._intersection_id_field = _intersection_id_field;
            this._intersection_name_field = _intersection_name_field;
            this._route_id_field = _route_id_field;
            this._feature_id_field = _feature_id_field;
            this._feature_class_name_field = _feature_class_name_field;
            this._from_date_field = _from_date_field;
            this._to_date_field = _to_date_field;
            this._intersecting_layers = _intersecting_layers;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Create LRS Intersection From Existing Dataset";

        public override string CallName => "locref.CreateLRSIntersectionFromExistingDataset";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_parent_network, _network_description_field, _in_feature_class, _intersection_id_field, _intersection_name_field, _route_id_field, _feature_id_field, _feature_class_name_field, _from_date_field, _to_date_field, _intersecting_layers, _consider_z.GetGPValue(), _z_tolerance, _measure_field, _out_feature_class];

        /// <summary>
        /// <para>Parent LRS Network</para>
        /// <para>The network to which the intersection will be registered.</para>
        /// <para>将注册交叉点的网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Parent LRS Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _parent_network { get; set; }


        /// <summary>
        /// <para>Network Description Field</para>
        /// <para>The field in the network layer that will be used to name the intersections with other intersecting layers.</para>
        /// <para>网络图层中将用于命名与其他相交图层的交点的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Description Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_description_field { get; set; }


        /// <summary>
        /// <para>Intersection Feature Class</para>
        /// <para>The input point feature class to be registered.</para>
        /// <para>要注册的输入点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Intersection Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>Intersection ID Field</para>
        /// <para>The ID field in the Intersection Feature Class. The field must have a unique ID for each intersection for a time slice.</para>
        /// <para>相交要素类中的 ID 字段。对于时间片的每个交点，该字段必须具有唯一的 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Intersection ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _intersection_id_field { get; set; }


        /// <summary>
        /// <para>Intersection Name Field</para>
        /// <para>The field in the Intersection Feature Class that is a concatenated field showing the descriptors for the route and the intersecting feature.</para>
        /// <para>相交要素类中的字段，该字段是显示路径和相交要素的描述符的串联字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Intersection Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _intersection_name_field { get; set; }


        /// <summary>
        /// <para>Route ID Field</para>
        /// <para>The field in the Intersection Feature Class that contains the route ID for the LRS Network.</para>
        /// <para>交汇要素类中包含 LRS 网络路径 ID 的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>Feature ID Field</para>
        /// <para>The field in the Intersection Feature Class that contains the ID for the intersecting feature.</para>
        /// <para>相交要素类中包含相交要素 ID 的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _feature_id_field { get; set; }


        /// <summary>
        /// <para>Feature Class Name Field</para>
        /// <para>The field in the Intersection Feature Class that contains the name of the feature class that participated in the intersection.</para>
        /// <para>“相交要素类”中的字段，其中包含参与相交的要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature Class Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _feature_class_name_field { get; set; }


        /// <summary>
        /// <para>From Date Field</para>
        /// <para>The from date field in the Intersection Feature Class.</para>
        /// <para>相交要素类中的起始日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_date_field { get; set; }


        /// <summary>
        /// <para>To Date Field</para>
        /// <para>The to date field in the Intersection Feature Class.</para>
        /// <para>相交要素类中的当前字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_date_field { get; set; }


        /// <summary>
        /// <para>Intersecting Layers</para>
        /// <para><xdoc>
        ///   <para>The feature class that intersects the LRS Network and contains the following information:</para>
        ///   <bulletList>
        ///     <bullet_item>Intersection Layer—The feature class that intersects the LRS Network.</bullet_item><para/>
        ///     <bullet_item>ID Field—The field in the intersecting layer used to uniquely identify the feature that intersects the network.</bullet_item><para/>
        ///     <bullet_item>Description Field—The field that provides the description, such as town or county name, of the intersecting feature.</bullet_item><para/>
        ///     <bullet_item>Name Separator—The name separator for the intersection, such as AND, INTERSECT, +, or |.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>与 LRS 网络相交并包含以下信息的要素类：</para>
        ///   <bulletList>
        ///     <bullet_item>交点图层 - 与 LRS 网络相交的要素类。</bullet_item><para/>
        ///     <bullet_item>ID 字段 - 相交图层中的字段，用于唯一标识与网络相交的要素。</bullet_item><para/>
        ///     <bullet_item>描述字段 - 提供相交要素的描述（例如城镇或县名称）的字段。</bullet_item><para/>
        ///     <bullet_item>名称分隔符 - 相交的名称分隔符，例如 AND、INTERSECT、+ 或 |。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Intersecting Layers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _intersecting_layers { get; set; }


        /// <summary>
        /// <para>Consider z-values when generating intersections</para>
        /// <para><xdoc>
        ///   <para>Specifies whether z-values will be used when generating intersections.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Z-values will be used during generation of intersections.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Z-values will not be used during generation of intersections. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在生成交集时是否使用 z 值。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 在生成交点期间将使用 Z 值。</bullet_item><para/>
        ///     <bullet_item>未选中 - 在生成相交点期间将不使用 Z 值。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Consider z-values when generating intersections")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _consider_z_value _consider_z { get; set; } = _consider_z_value._false;

        public enum _consider_z_value
        {
            /// <summary>
            /// <para>DO_NOT_CONSIDER_Z</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_CONSIDER_Z")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>CONSIDER_Z</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CONSIDER_Z")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Z Tolerance</para>
        /// <para>The z-tolerance used to generate intersections.</para>
        /// <para>用于生成交点的 z 容差。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _z_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Measure Field</para>
        /// <para>The measure on the base route at the point of intersection.</para>
        /// <para>相交点处基本路径上的度量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _measure_field { get; set; } = null;


        /// <summary>
        /// <para>Output Details File</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Details File")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public CreateLRSIntersectionFromExistingDataset SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}